// @ts-ignore
/* eslint-disable */
import request from '@/request'

/** 新增预报名 POST /api/join/addPre/${param0}/${param1} */
export async function addPreUsingPost(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.addPreUsingPOSTParams,
  options?: { [key: string]: any }
) {
  const { isTeacher: param0, race: param1, ...queryParams } = params
  return request<API.R>(`/api/join/addPre/${param0}/${param1}`, {
    method: 'POST',
    params: { ...queryParams },
    ...(options || {}),
  })
}

/** 修改学生预报名 PUT /api/join/preStudent */
export async function editPreStudentUsingPut(
  body: API.xueshengyubaomingduixiang,
  options?: { [key: string]: any }
) {
  return request<API.R>('/api/join/preStudent', {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 根据比赛id分页查询预报名学生列表 POST /api/join/preStudent/${param0} */
export async function getPreStudentsByRaceIdUsingPost1(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getPreStudentsByRaceIdUsingPOST1Params,
  options?: { [key: string]: any }
) {
  const { RaceId: param0, ...queryParams } = params
  return request<API.MyPageVoListxueshengyubaomingxinxiVO>(`/api/join/preStudent/${param0}`, {
    method: 'POST',
    params: {
      ...queryParams,
    },
    ...(options || {}),
  })
}

/** 根据比赛id查询预报名学生信息 POST /api/join/preStudentByRace */
export async function getPreStudentsByRaceIdUsingPost(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getPreStudentsByRaceIdUsingPOSTParams,
  options?: { [key: string]: any }
) {
  return request<API.Rxueshengyubaomingduixiang>('/api/join/preStudentByRace', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** 修改老师预报名 PUT /api/join/preTeacher */
export async function editPreTeacherUsingPut(
  body: API.laoshiyubaomingduixiang,
  options?: { [key: string]: any }
) {
  return request<API.R>('/api/join/preTeacher', {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 根据比赛id分页查询预报名老师列表 POST /api/join/preTeacher/${param0} */
export async function getPreTeachersByRaceIdUsingPost(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getPreTeachersByRaceIdUsingPOSTParams,
  options?: { [key: string]: any }
) {
  const { RaceId: param0, ...queryParams } = params
  return request<API.MyPageVoListlaoshiyubaomingxinxiVO>(`/api/join/preTeacher/${param0}`, {
    method: 'POST',
    params: {
      ...queryParams,
    },
    ...(options || {}),
  })
}

/** 删除老师预报名 DELETE /api/join/removePre/${param0}/${param2} */
export async function removePreUsingDelete(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.removePreUsingDELETEParams,
  options?: { [key: string]: any }
) {
  const { isTeacher: param0, RaceId: param1, race: param2, ...queryParams } = params
  return request<API.R>(`/api/join/removePre/${param0}/${param2}`, {
    method: 'DELETE',
    params: { ...queryParams },
    ...(options || {}),
  })
}
